/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package mnstudent.presentationlayer;

import mnstudent.global.Standard;
import mnstudent.businessLayer.OrderSemesterBLL;
import mnstudent.datatranferobject.OrderSemesterDTO;
import java.awt.Dimension;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.util.Vector;
import javax.swing.event.*;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author lee
 */
public class frmReceipts extends javax.swing.JPanel {

    private OrderSemesterBLL m_OrderSemesterBLL;
    private int currentRow = 0;
    //private boolean m_isSave = false;
    private DefaultTableModel m_Model;
    /**
     * Creates new form frmOrderSemester
     */
    public frmReceipts() {
        initComponents();
        initControls();
        prepare();
    }

    private void initControls()
    {
      
    }
    private void prepare(){

        //TextField tinh/quan 
        jxTxtNameOfOrderSemester.addKeyListener(new KeyAdapter() {
                public void keyTyped(KeyEvent e) {
                    int len = jxTxtNameOfOrderSemester.getText().length();
                    if (len > Standard.MAX_LEN) {
                            e.consume();
                    }
                }
        });
        //Set lai text cac button cua dialog
        UIManager.put("OptionPane.cancelButtonText", "Hủy");
        UIManager.put("OptionPane.noButtonText", "Không");
        UIManager.put("OptionPane.okButtonText", "Có");
        UIManager.put("OptionPane.yesButtonText", "Vâng");
        //
       
    }
    /**
     * Ham thuc hien insert Khoa xuong database
     * @return 
     */
    private void saveToDatabase()
    {
    }

    /**
     * Ham thuc hien cap nhat Khoa
     * @return 
     */
    private void updateToDatabase()
    {
        
      
    }

    /**
     * Ham thuc hien viec cap nhat va update
     */
     private void save()
    {
        
    }
     
     private void cancelAction()
     {
       
     }
     
     private void refreshDataInJTable()
    {
      
    }
     

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        jxpanDetails = new org.jdesktop.swingx.JXPanel();
        jpanTableDetails = new javax.swing.JPanel();
        jpanContent = new javax.swing.JPanel();
        jXPanel1 = new org.jdesktop.swingx.JXPanel();
        jXLabel2 = new org.jdesktop.swingx.JXLabel();
        jSpinner1 = new javax.swing.JSpinner();
        jXLabel3 = new org.jdesktop.swingx.JXLabel();
        jSpinner2 = new javax.swing.JSpinner();
        jXLabel4 = new org.jdesktop.swingx.JXLabel();
        jSpinner3 = new javax.swing.JSpinner();
        jXLabel6 = new org.jdesktop.swingx.JXLabel();
        jSpinner4 = new javax.swing.JSpinner();
        jXLabel9 = new org.jdesktop.swingx.JXLabel();
        jXLabel10 = new org.jdesktop.swingx.JXLabel();
        jXLabel11 = new org.jdesktop.swingx.JXLabel();
        jXLabel12 = new org.jdesktop.swingx.JXLabel();
        jXLabel8 = new org.jdesktop.swingx.JXLabel();
        jSpinner6 = new javax.swing.JSpinner();
        jXLabel13 = new org.jdesktop.swingx.JXLabel();
        jSpinner7 = new javax.swing.JSpinner();
        jXLabel14 = new org.jdesktop.swingx.JXLabel();
        jXLabel15 = new org.jdesktop.swingx.JXLabel();
        jpanFuntionalDetails = new javax.swing.JPanel();
        jxBtnAdd = new org.jdesktop.swingx.JXButton();
        jxBtnSave = new org.jdesktop.swingx.JXButton();
        jxBtnCancel = new org.jdesktop.swingx.JXButton();
        jxpanHeader = new org.jdesktop.swingx.JXPanel();
        jxpanTitleHeader = new org.jdesktop.swingx.JXPanel();
        jXLabel5 = new org.jdesktop.swingx.JXLabel();
        jxpanInfoHeader = new org.jdesktop.swingx.JXPanel();
        jxpanInfo = new org.jdesktop.swingx.JXPanel();
        jxLabFacultyID = new org.jdesktop.swingx.JXLabel();
        jxTxtOrderSemesterID = new org.jdesktop.swingx.JXTextField();
        jxLabNameOfFaculty = new org.jdesktop.swingx.JXLabel();
        jxTxtNameOfOrderSemester = new org.jdesktop.swingx.JXTextField();
        jxLabFacultyID1 = new org.jdesktop.swingx.JXLabel();
        jxTxtOrderSemesterID1 = new org.jdesktop.swingx.JXTextField();
        jxLabNameOfFaculty1 = new org.jdesktop.swingx.JXLabel();
        jxTxtNameOfOrderSemester1 = new org.jdesktop.swingx.JXTextField();
        jxLabNameOfFaculty2 = new org.jdesktop.swingx.JXLabel();
        jXDatePicker1 = new org.jdesktop.swingx.JXDatePicker();
        jSpinner5 = new javax.swing.JSpinner();
        jXLabel7 = new org.jdesktop.swingx.JXLabel();

        setLayout(new java.awt.BorderLayout());

        jxpanDetails.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jxpanDetails.setLayout(new java.awt.BorderLayout());

        jpanTableDetails.setLayout(new java.awt.BorderLayout());

        jpanContent.setLayout(new java.awt.BorderLayout());

        jXPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jXLabel2.setText("Tổng tiền học phí(= TongTienHocPhi - SoTienDuocGiam)");

        jXLabel3.setText("Số tiền phải đóng");

        jXLabel4.setText("Số tiền khuyến khích(nếu có)");

        jXLabel6.setText("Tổng tiền còn nợ");

        jXLabel9.setText("VND");

        jXLabel10.setText("VND");

        jXLabel11.setText("VND");

        jXLabel12.setText("VND");

        jXLabel8.setText("Số tiền thu");

        jXLabel13.setText("Số tiền còn lại");

        jXLabel14.setText("VND");

        jXLabel15.setText("VND");

        javax.swing.GroupLayout jXPanel1Layout = new javax.swing.GroupLayout(jXPanel1);
        jXPanel1.setLayout(jXPanel1Layout);
        jXPanel1Layout.setHorizontalGroup(
            jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jXPanel1Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jXPanel1Layout.createSequentialGroup()
                        .addComponent(jXLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(51, 51, 51)
                        .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jXPanel1Layout.createSequentialGroup()
                            .addGap(55, 55, 55)
                            .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jXLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jXLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(51, 51, 51)
                            .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jSpinner1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jSpinner4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jXPanel1Layout.createSequentialGroup()
                            .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jXLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jXLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(51, 51, 51)
                            .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jSpinner6, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jSpinner7, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jXPanel1Layout.createSequentialGroup()
                        .addComponent(jXLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(51, 51, 51)
                        .addComponent(jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jXPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jXLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jXPanel1Layout.createSequentialGroup()
                                .addGap(81, 81, 81)
                                .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jXLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jXLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jXLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGroup(jXPanel1Layout.createSequentialGroup()
                            .addGap(82, 82, 82)
                            .addComponent(jXLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jXPanel1Layout.createSequentialGroup()
                        .addGap(82, 82, 82)
                        .addComponent(jXLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jXPanel1Layout.setVerticalGroup(
            jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jXPanel1Layout.createSequentialGroup()
                .addGap(30, 30, 30)
                .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jXLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jXLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jSpinner4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(33, 33, 33)
                .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jXLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jXLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jXLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(40, 40, 40)
                .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jXLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jSpinner6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jXLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jSpinner7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(20, Short.MAX_VALUE))
        );

        jpanContent.add(jXPanel1, java.awt.BorderLayout.CENTER);

        jpanTableDetails.add(jpanContent, java.awt.BorderLayout.CENTER);

        jpanFuntionalDetails.setLayout(new java.awt.GridBagLayout());

        jxBtnAdd.setText("Thêm mới");
        jxBtnAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jxBtnAddActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 20;
        gridBagConstraints.ipady = 6;
        gridBagConstraints.insets = new java.awt.Insets(8, 10, 6, 9);
        jpanFuntionalDetails.add(jxBtnAdd, gridBagConstraints);

        jxBtnSave.setText("Lưu xuống");
        jxBtnSave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jxBtnSaveActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 20;
        gridBagConstraints.ipady = 6;
        gridBagConstraints.insets = new java.awt.Insets(11, 9, 7, 8);
        jpanFuntionalDetails.add(jxBtnSave, gridBagConstraints);

        jxBtnCancel.setText("Xem phiếu thu");
        jxBtnCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jxBtnCancelActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 20;
        gridBagConstraints.ipady = 6;
        gridBagConstraints.insets = new java.awt.Insets(12, 9, 8, 9);
        jpanFuntionalDetails.add(jxBtnCancel, gridBagConstraints);

        jpanTableDetails.add(jpanFuntionalDetails, java.awt.BorderLayout.EAST);

        jxpanDetails.add(jpanTableDetails, java.awt.BorderLayout.CENTER);

        add(jxpanDetails, java.awt.BorderLayout.CENTER);

        jxpanHeader.setLayout(new java.awt.BorderLayout());

        jxpanTitleHeader.setBorder(new org.jdesktop.swingx.border.DropShadowBorder());

        jXLabel5.setForeground(new java.awt.Color(0, 102, 255));
        jXLabel5.setText("PHIẾU THU");
        jXLabel5.setFont(new java.awt.Font("Times New Roman", 1, 24)); // NOI18N
        jxpanTitleHeader.add(jXLabel5);

        jxpanHeader.add(jxpanTitleHeader, java.awt.BorderLayout.PAGE_START);

        jxpanInfoHeader.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jxpanInfoHeader.setLayout(new java.awt.BorderLayout());

        jxpanInfo.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "THÔNG TIN", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP));

        jxLabFacultyID.setText("Mã số sinh viên");

        jxTxtOrderSemesterID.addCaretListener(new javax.swing.event.CaretListener() {
            public void caretUpdate(javax.swing.event.CaretEvent evt) {
                jxTxtOrderSemesterIDCaretUpdate(evt);
            }
        });

        jxLabNameOfFaculty.setText("Họ & tên");

        jxTxtNameOfOrderSemester.addCaretListener(new javax.swing.event.CaretListener() {
            public void caretUpdate(javax.swing.event.CaretEvent evt) {
                jxTxtNameOfOrderSemesterCaretUpdate(evt);
            }
        });
        jxTxtNameOfOrderSemester.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jxTxtNameOfOrderSemesterKeyPressed(evt);
            }
        });

        jxLabFacultyID1.setText("Học kỳ");

        jxTxtOrderSemesterID1.addCaretListener(new javax.swing.event.CaretListener() {
            public void caretUpdate(javax.swing.event.CaretEvent evt) {
                jxTxtOrderSemesterID1CaretUpdate(evt);
            }
        });

        jxLabNameOfFaculty1.setText("Năm học");

        jxTxtNameOfOrderSemester1.addCaretListener(new javax.swing.event.CaretListener() {
            public void caretUpdate(javax.swing.event.CaretEvent evt) {
                jxTxtNameOfOrderSemester1CaretUpdate(evt);
            }
        });
        jxTxtNameOfOrderSemester1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jxTxtNameOfOrderSemester1KeyPressed(evt);
            }
        });

        jxLabNameOfFaculty2.setText("Ngày thu");

        jXDatePicker1.setFormats("dd/MM/yyyy");

        jXLabel7.setText("Lần thu");

        javax.swing.GroupLayout jxpanInfoLayout = new javax.swing.GroupLayout(jxpanInfo);
        jxpanInfo.setLayout(jxpanInfoLayout);
        jxpanInfoLayout.setHorizontalGroup(
            jxpanInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jxpanInfoLayout.createSequentialGroup()
                .addGap(31, 31, 31)
                .addGroup(jxpanInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jxLabFacultyID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jxLabFacultyID1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jxpanInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jxTxtOrderSemesterID, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jxTxtOrderSemesterID1, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(100, 100, 100)
                .addGroup(jxpanInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jxLabNameOfFaculty1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jxLabNameOfFaculty, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jxpanInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jxTxtNameOfOrderSemester, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jxTxtNameOfOrderSemester1, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(100, 100, 100)
                .addGroup(jxpanInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jxpanInfoLayout.createSequentialGroup()
                        .addComponent(jxLabNameOfFaculty2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jXDatePicker1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jxpanInfoLayout.createSequentialGroup()
                        .addComponent(jXLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jSpinner5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jxpanInfoLayout.setVerticalGroup(
            jxpanInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jxpanInfoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jxpanInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jxLabFacultyID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jxTxtOrderSemesterID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jxLabNameOfFaculty, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jxTxtNameOfOrderSemester, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jxLabNameOfFaculty2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXDatePicker1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jxpanInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jxpanInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jXLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jSpinner5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jxpanInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jxLabFacultyID1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jxTxtOrderSemesterID1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jxLabNameOfFaculty1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jxTxtNameOfOrderSemester1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jxpanInfoHeader.add(jxpanInfo, java.awt.BorderLayout.CENTER);

        jxpanHeader.add(jxpanInfoHeader, java.awt.BorderLayout.CENTER);

        add(jxpanHeader, java.awt.BorderLayout.NORTH);
    }// </editor-fold>//GEN-END:initComponents

    private void jxBtnAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jxBtnAddActionPerformed
      
    }//GEN-LAST:event_jxBtnAddActionPerformed

    private void jxTxtOrderSemesterIDCaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_jxTxtOrderSemesterIDCaretUpdate
     
    }//GEN-LAST:event_jxTxtOrderSemesterIDCaretUpdate

    private void jxTxtNameOfOrderSemesterCaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_jxTxtNameOfOrderSemesterCaretUpdate
      
    }//GEN-LAST:event_jxTxtNameOfOrderSemesterCaretUpdate

    private void jxBtnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jxBtnSaveActionPerformed

       save();
    }//GEN-LAST:event_jxBtnSaveActionPerformed

    private void jxBtnCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jxBtnCancelActionPerformed
       
        cancelAction();
    }//GEN-LAST:event_jxBtnCancelActionPerformed

    private void jxTxtNameOfOrderSemesterKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jxTxtNameOfOrderSemesterKeyPressed
        if(evt.getKeyCode() == KeyEvent.VK_ENTER)
        {
            save();
        }
        
        if(jxTxtNameOfOrderSemester.getText().length()>Standard.MAX_LEN)
            jxTxtNameOfOrderSemester.setText(jxTxtNameOfOrderSemester.getText().substring(0, Standard.MAX_LEN));
    }//GEN-LAST:event_jxTxtNameOfOrderSemesterKeyPressed

    private void jxTxtOrderSemesterID1CaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_jxTxtOrderSemesterID1CaretUpdate
        // TODO add your handling code here:
    }//GEN-LAST:event_jxTxtOrderSemesterID1CaretUpdate

    private void jxTxtNameOfOrderSemester1CaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_jxTxtNameOfOrderSemester1CaretUpdate
        // TODO add your handling code here:
    }//GEN-LAST:event_jxTxtNameOfOrderSemester1CaretUpdate

    private void jxTxtNameOfOrderSemester1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jxTxtNameOfOrderSemester1KeyPressed
        // TODO add your handling code here:
    }//GEN-LAST:event_jxTxtNameOfOrderSemester1KeyPressed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JSpinner jSpinner1;
    private javax.swing.JSpinner jSpinner2;
    private javax.swing.JSpinner jSpinner3;
    private javax.swing.JSpinner jSpinner4;
    private javax.swing.JSpinner jSpinner5;
    private javax.swing.JSpinner jSpinner6;
    private javax.swing.JSpinner jSpinner7;
    private org.jdesktop.swingx.JXDatePicker jXDatePicker1;
    private org.jdesktop.swingx.JXLabel jXLabel10;
    private org.jdesktop.swingx.JXLabel jXLabel11;
    private org.jdesktop.swingx.JXLabel jXLabel12;
    private org.jdesktop.swingx.JXLabel jXLabel13;
    private org.jdesktop.swingx.JXLabel jXLabel14;
    private org.jdesktop.swingx.JXLabel jXLabel15;
    private org.jdesktop.swingx.JXLabel jXLabel2;
    private org.jdesktop.swingx.JXLabel jXLabel3;
    private org.jdesktop.swingx.JXLabel jXLabel4;
    private org.jdesktop.swingx.JXLabel jXLabel5;
    private org.jdesktop.swingx.JXLabel jXLabel6;
    private org.jdesktop.swingx.JXLabel jXLabel7;
    private org.jdesktop.swingx.JXLabel jXLabel8;
    private org.jdesktop.swingx.JXLabel jXLabel9;
    private org.jdesktop.swingx.JXPanel jXPanel1;
    private javax.swing.JPanel jpanContent;
    private javax.swing.JPanel jpanFuntionalDetails;
    private javax.swing.JPanel jpanTableDetails;
    private org.jdesktop.swingx.JXButton jxBtnAdd;
    private org.jdesktop.swingx.JXButton jxBtnCancel;
    private org.jdesktop.swingx.JXButton jxBtnSave;
    private org.jdesktop.swingx.JXLabel jxLabFacultyID;
    private org.jdesktop.swingx.JXLabel jxLabFacultyID1;
    private org.jdesktop.swingx.JXLabel jxLabNameOfFaculty;
    private org.jdesktop.swingx.JXLabel jxLabNameOfFaculty1;
    private org.jdesktop.swingx.JXLabel jxLabNameOfFaculty2;
    private org.jdesktop.swingx.JXTextField jxTxtNameOfOrderSemester;
    private org.jdesktop.swingx.JXTextField jxTxtNameOfOrderSemester1;
    private org.jdesktop.swingx.JXTextField jxTxtOrderSemesterID;
    private org.jdesktop.swingx.JXTextField jxTxtOrderSemesterID1;
    private org.jdesktop.swingx.JXPanel jxpanDetails;
    private org.jdesktop.swingx.JXPanel jxpanHeader;
    private org.jdesktop.swingx.JXPanel jxpanInfo;
    private org.jdesktop.swingx.JXPanel jxpanInfoHeader;
    private org.jdesktop.swingx.JXPanel jxpanTitleHeader;
    // End of variables declaration//GEN-END:variables
}
